package com.ywjh.inter.entity;

import java.sql.Timestamp;

/**
 * 机构表
 * @author angjoy
 *
 */
public class InstitutionEntity {
	private int id ;
	private String name;
	private int institutionTypeId;
	private int hospitalTypeId;
	private int natureTypeId;
	private int levelTypeId;
	private int provinceId;
	private int cityId;
	private int localId;
	private String localInfo;
	private String phone;
	private String systemName;
	private int opStatus;
	private int departmentTypeId;
	private String unitsName;
	private int unitsLevel1Id;
	private int unitsLevel2Id;
	private Timestamp createTime;
	private int createOpId;
	private int isRoot;
	private int pid;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getInstitutionTypeId() {
		return institutionTypeId;
	}
	public void setInstitutionTypeId(int institutionTypeId) {
		this.institutionTypeId = institutionTypeId;
	}
	public int getHospitalTypeId() {
		return hospitalTypeId;
	}
	public void setHospitalTypeId(int hospitalTypeId) {
		this.hospitalTypeId = hospitalTypeId;
	}
	public int getNatureTypeId() {
		return natureTypeId;
	}
	public void setNatureTypeId(int natureTypeId) {
		this.natureTypeId = natureTypeId;
	}
	public int getLevelTypeId() {
		return levelTypeId;
	}
	public void setLevelTypeId(int levelTypeId) {
		this.levelTypeId = levelTypeId;
	}
	public int getProvinceId() {
		return provinceId;
	}
	public void setProvinceId(int provinceId) {
		this.provinceId = provinceId;
	}
	public int getCityId() {
		return cityId;
	}
	public void setCityId(int cityId) {
		this.cityId = cityId;
	}
	public int getLocalId() {
		return localId;
	}
	public void setLocalId(int localId) {
		this.localId = localId;
	}
	public String getLocalInfo() {
		return localInfo;
	}
	public void setLocalInfo(String localInfo) {
		this.localInfo = localInfo;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getSystemName() {
		return systemName;
	}
	public void setSystemName(String systemName) {
		this.systemName = systemName;
	}
	public int getOpStatus() {
		return opStatus;
	}
	public void setOpStatus(int opStatus) {
		this.opStatus = opStatus;
	}
	public int getDepartmentTypeId() {
		return departmentTypeId;
	}
	public void setDepartmentTypeId(int departmentTypeId) {
		this.departmentTypeId = departmentTypeId;
	}
	public String getUnitsName() {
		return unitsName;
	}
	public void setUnitsName(String unitsName) {
		this.unitsName = unitsName;
	}
	public int getUnitsLevel1Id() {
		return unitsLevel1Id;
	}
	public void setUnitsLevel1Id(int unitsLevel1Id) {
		this.unitsLevel1Id = unitsLevel1Id;
	}
	public int getUnitsLevel2Id() {
		return unitsLevel2Id;
	}
	public void setUnitsLevel2Id(int unitsLevel2Id) {
		this.unitsLevel2Id = unitsLevel2Id;
	}
	public Timestamp getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}
	public int getCreateOpId() {
		return createOpId;
	}
	public void setCreateOpId(int createOpId) {
		this.createOpId = createOpId;
	}
	public int getIsRoot() {
		return isRoot;
	}
	public void setIsRoot(int isRoot) {
		this.isRoot = isRoot;
	}
	public int getPid() {
		return pid;
	}
	public void setPid(int pid) {
		this.pid = pid;
	}
	@Override
	public String toString() {
		return "InstitutionEntity [id=" + id + ", name=" + name + ", institutionTypeId=" + institutionTypeId
				+ ", hospitalTypeId=" + hospitalTypeId + ", natureTypeId=" + natureTypeId + ", levelTypeId="
				+ levelTypeId + ", provinceId=" + provinceId + ", cityId=" + cityId + ", localId=" + localId
				+ ", localInfo=" + localInfo + ", phone=" + phone + ", systemName=" + systemName + ", opStatus="
				+ opStatus + ", departmentTypeId=" + departmentTypeId + ", unitsName=" + unitsName + ", unitsLevel1Id="
				+ unitsLevel1Id + ", unitsLevel2Id=" + unitsLevel2Id + ", createTime=" + createTime + ", createOpId="
				+ createOpId + ", isRoot=" + isRoot + ", pid=" + pid + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + cityId;
		result = prime * result + createOpId;
		result = prime * result + ((createTime == null) ? 0 : createTime.hashCode());
		result = prime * result + departmentTypeId;
		result = prime * result + hospitalTypeId;
		result = prime * result + id;
		result = prime * result + institutionTypeId;
		result = prime * result + isRoot;
		result = prime * result + levelTypeId;
		result = prime * result + localId;
		result = prime * result + ((localInfo == null) ? 0 : localInfo.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + natureTypeId;
		result = prime * result + opStatus;
		result = prime * result + ((phone == null) ? 0 : phone.hashCode());
		result = prime * result + pid;
		result = prime * result + provinceId;
		result = prime * result + ((systemName == null) ? 0 : systemName.hashCode());
		result = prime * result + unitsLevel1Id;
		result = prime * result + unitsLevel2Id;
		result = prime * result + ((unitsName == null) ? 0 : unitsName.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		InstitutionEntity other = (InstitutionEntity) obj;
		if (cityId != other.cityId)
			return false;
		if (createOpId != other.createOpId)
			return false;
		if (createTime == null) {
			if (other.createTime != null)
				return false;
		} else if (!createTime.equals(other.createTime))
			return false;
		if (departmentTypeId != other.departmentTypeId)
			return false;
		if (hospitalTypeId != other.hospitalTypeId)
			return false;
		if (id != other.id)
			return false;
		if (institutionTypeId != other.institutionTypeId)
			return false;
		if (isRoot != other.isRoot)
			return false;
		if (levelTypeId != other.levelTypeId)
			return false;
		if (localId != other.localId)
			return false;
		if (localInfo == null) {
			if (other.localInfo != null)
				return false;
		} else if (!localInfo.equals(other.localInfo))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (natureTypeId != other.natureTypeId)
			return false;
		if (opStatus != other.opStatus)
			return false;
		if (phone == null) {
			if (other.phone != null)
				return false;
		} else if (!phone.equals(other.phone))
			return false;
		if (pid != other.pid)
			return false;
		if (provinceId != other.provinceId)
			return false;
		if (systemName == null) {
			if (other.systemName != null)
				return false;
		} else if (!systemName.equals(other.systemName))
			return false;
		if (unitsLevel1Id != other.unitsLevel1Id)
			return false;
		if (unitsLevel2Id != other.unitsLevel2Id)
			return false;
		if (unitsName == null) {
			if (other.unitsName != null)
				return false;
		} else if (!unitsName.equals(other.unitsName))
			return false;
		return true;
	}
	
	
}
